/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: AreaModel.java
 * Author:   15050536
 * Date:     2017年1月6日 上午11:10:14
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.po.mainpushnew;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 大区款数关联表对应的实体
 *
 * @author 15050536 石键平
 */
@Entity(name = "area_model_rel")
public class AreaModel implements Serializable {

	/**
	 */
	private static final long serialVersionUID = 3799652288842999593L;

	/**
	 * 主键id
	 */
	private Long id;

	/**
	 * 大区任务id
	 */
	private Long areaTaskId;

	/**
	 * 总部任务id
	 */
	private Long hqTaskId;

	/**
	 * 款数id
	 */
	private Long modelId;

	/**
	 * 目标数量
	 */
	private Integer targetNum;

	/**
	 * 分配状态 0:未分配，1：已分配
	 */
	private Short distStatus;

	public AreaModel() {

	}

	/**
	 * @param areaTaskId
	 * @param hqTaskId
	 * @param modelId
	 * @param targetNum
	 */
	public AreaModel(Long areaTaskId, Long hqTaskId, Long modelId, Integer targetNum) {
		super();
		this.areaTaskId = areaTaskId;
		this.hqTaskId = hqTaskId;
		this.modelId = modelId;
		this.targetNum = targetNum;
		this.distStatus = 0;
	}

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.TABLE)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "area_task_id")
	public Long getAreaTaskId() {
		return areaTaskId;
	}

	public void setAreaTaskId(Long areaTaskId) {
		this.areaTaskId = areaTaskId;
	}

	@Column(name = "hq_task_id")
	public Long getHqTaskId() {
		return hqTaskId;
	}

	public void setHqTaskId(Long hqTaskId) {
		this.hqTaskId = hqTaskId;
	}

	@Column(name = "model_id")
	public Long getModelId() {
		return modelId;
	}

	public void setModelId(Long modelId) {
		this.modelId = modelId;
	}

	@Column(name = "target_num")
	public Integer getTargetNum() {
		return targetNum;
	}

	public void setTargetNum(Integer targetNum) {
		this.targetNum = targetNum;
	}

	@Column(name = "dist_status")
	public Short getDistStatus() {
		return distStatus;
	}

	public void setDistStatus(Short distStatus) {
		this.distStatus = distStatus;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

}
